package com.han.controller;


import com.han.service.HelloService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(path = "/hi")
public class HelloController {

    @Resource
    private HelloService helloService;


    @RequestMapping(path = "/sy", method = RequestMethod.GET)
    public String sy(){
        // 1.根据服务名称，拉取服务的实例列表
        helloService.sayHi();
        return "service-2 say hi";
    }
}
